home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
pgm_ctrl
/
cuactrls
/
ctoolbar.frm
< prev
next >
Wrap
Text File
|
1995-05-22
|
18KB
|
562 lines
VERSION 2.00
Begin Form frmToolBar
Caption = "Tool Bar Demo"
ClientHeight = 1215
ClientLeft = 75
ClientTop = 855
ClientWidth = 9705
ClipControls = 0 'False
Height = 1620
Icon = CTOOLBAR.FRX:0000
Left = 15
LinkTopic = "Form3"
ScaleHeight = 1215
ScaleWidth = 9705
Top = 510
Width = 9825
Begin CUACommand cmdOK
Caption = "OK"
Default = -1 'True
Height = 345
Left = 8400
StandardButton = 1 'OK
TabIndex = 43
Top = 855
Width = 1260
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 20
Left = 7410
StandardButton = 7 'Print
TabIndex = 42
Top = 30
Width = 360
End
Begin CUAToolTips tip1
BackColor = &H0080FFFF&
Caption = "ToolTips"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 3885
TabIndex = 41
Top = 870
Width = 825
End
Begin PictureBox picTool
AutoSize = -1 'True
Height = 255
Left = 3675
Picture = CTOOLBAR.FRX:0302
ScaleHeight = 225
ScaleWidth = 4800
TabIndex = 12
Top = 870
Visible = 0 'False
Width = 4830
End
Begin CUAStatus sts2
Align = 1 'Align Top
BackColor = &H00C0C0C0&
ClipControls = 0 'False
Height = 405
Left = 0
TabIndex = 11
Top = 0
Width = 9705
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 14
Left = 8535
TabIndex = 14
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 13
Left = 8190
TabIndex = 15
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 12
Left = 7845
TabIndex = 16
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 11
Left = 7065
TabIndex = 17
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 10
Left = 6585
TabIndex = 18
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 9
Left = 6135
TabIndex = 19
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 8
Left = 5790
TabIndex = 20
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 7
Left = 5445
TabIndex = 21
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 6
Left = 5100
TabIndex = 22
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 5
Left = 4755
TabIndex = 23
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 4
Left = 4290
TabIndex = 24
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 3
Left = 3945
TabIndex = 25
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomCount = 20
Height = 330
Index = 2
Left = 3600
TabIndex = 26
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomButton = 3
CustomCount = 20
Height = 330
Index = 1
Left = 3255
TabIndex = 27
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
CustomButton = 2
CustomCount = 20
Height = 330
Index = 0
Left = 2910
TabIndex = 28
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 6
Left = 2430
StandardButton = 12 'Undo
TabIndex = 6
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 5
Left = 1965
StandardButton = 11 'Paste
TabIndex = 5
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 4
Left = 1620
StandardButton = 10 'Copy
TabIndex = 4
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 3
Left = 1275
StandardButton = 9 'Cut
TabIndex = 3
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Enabled = 0 'False
Height = 330
Index = 2
Left = 795
StandardButton = 6 'Save
TabIndex = 2
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 1
Left = 450
StandardButton = 5 'Open
TabIndex = 1
Top = 30
Width = 360
End
Begin CUAToolButton tbn1
Height = 330
Index = 0
Left = 105
StandardButton = 4 'New
TabIndex = 0
Top = 30
Width = 360
End
End
Begin CUAStatus sts1
Align = 1 'Align Top
BackColor = &H00C0C0C0&
ClipControls = 0 'False
Height = 405
Left = 0
TabIndex = 7
Top = 405
Width = 9705
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
ButtonType = 1 'Attribute
CustomCount = 20
Height = 330
Index = 19
Left = 9090
TabIndex = 29
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
ButtonType = 1 'Attribute
CustomCount = 20
Height = 330
Index = 18
Left = 8640
TabIndex = 30
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
ButtonType = 1 'Attribute
CustomCount = 20
Height = 330
Index = 17
Left = 8295
TabIndex = 31
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
ButtonType = 1 'Attribute
CustomCount = 20
Height = 330
Index = 16
Left = 7950
TabIndex = 32
Top = 30
Width = 360
End
Begin CUAToolButton tbnWord
ButtonSource = 1 'Custom
ButtonType = 1 'Attribute
CustomCount = 20
Height = 330
Index = 15
Left = 7605
TabIndex = 33
Top = 30
Value = 1 'Down
Width = 360
End
Begin CUAToolButton tbnJust
ButtonType = 1 'Attribute
Height = 330
Index = 3
Left = 7155
StandardButton = 34 'Just
TabIndex = 34
Top = 30
Width = 360
End
Begin CUAToolButton tbnJust
ButtonType = 1 'Attribute
Height = 330
Index = 2
Left = 6810
StandardButton = 37 'Right
TabIndex = 35
Top = 30
Width = 360
End
Begin CUAToolButton tbnJust
ButtonType = 1 'Attribute
Height = 330
Index = 1
Left = 6465
StandardButton = 36 'Center
TabIndex = 36
Top = 30
Width = 360
End
Begin CUAToolButton tbnJust
ButtonType = 1 'Attribute
Height = 330
Index = 0
Left = 6120
StandardButton = 35 'Left
TabIndex = 37
Top = 30
Value = 1 'Down
Width = 360
End
Begin CUACombo cbo3
BorderStyle = 3 'Inset
Height = 300
Left = 4080
TabIndex = 10
Text = "10"
Top = 45
Width = 765
End
Begin CUACombo cbo2
BorderStyle = 3 'Inset
Height = 300
Left = 1905
TabIndex = 9
Text = "Times New Roman"
Top = 45
Width = 2070
End
Begin CUACombo cbo1
BorderStyle = 3 'Inset
Height = 300
Left = 90
TabIndex = 8
Text = "Normal"
Top = 45
Width = 1725
End
Begin CUAToolButton tbnFontAttr
ButtonType = 1 'Attribute
Height = 330
Index = 2
Left = 5640
StandardButton = 40 'Under
TabIndex = 38
Top = 30
Width = 360
End
Begin CUAToolButton tbnFontAttr
ButtonType = 1 'Attribute
Height = 330
Index = 1
Left = 5295
StandardButton = 39 'Italic
TabIndex = 39
Top = 30
Width = 360
End
Begin CUAToolButton tbnFontAttr
ButtonType = 1 'Attribute
Height = 330
Index = 0
Left = 4950
StandardButton = 38 'Bold
TabIndex = 40
Top = 30
Width = 360
End
End
Begin CUALabel lbl1
Caption = "This is an example of the tool bar in Word 2.0."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000080&
Height = 195
Left = 120
TabIndex = 13
Top = 900
Width = 3480
End
End
Option Explicit
Sub cmdOK_Click ()
Unload Me
End Sub
Sub Form_Load ()
Dim I%
For I = 0 To 19
tbnWord(I).Picture = picTool
tbnWord(I).CustomCount = 20
tbnWord(I).CustomButton = I + 1
Next
End Sub
Sub tbnJust_Click (Index As Integer)
Dim I%
For I = 0 To 3
If I <> Index Then tbnJust(I).Value = 0
Next
End Sub
Sub tip1_NeedText (hWnd As Integer, ToolText As String)
Select Case hWnd
Case tbn1(0).hWnd
ToolText = "New"
Case tbn1(1).hWnd
ToolText = "Open"
Case tbn1(2).hWnd
ToolText = "Save"
Case tbn1(3).hWnd
ToolText = "Cut"
Case tbn1(4).hWnd
ToolText = "Copy"
Case tbn1(5).hWnd
ToolText = "Paste"
Case tbn1(6).hWnd
ToolText = "Undo"
Case tbnFontAttr(0).hWnd
ToolText = "Bold"
Case tbnFontAttr(1).hWnd
ToolText = "Italic"
Case tbnFontAttr(2).hWnd
ToolText = "Underline"
Case tbnJust(0).hWnd
ToolText = "Left"
Case tbnJust(1).hWnd
ToolText = "Center"
Case tbnJust(2).hWnd
ToolText = "Right"
Case tbnJust(3).hWnd
ToolText = "Margin"
Case tbnWord(0).hWnd
ToolText = "Reverses the last action"
Case tbnWord(1).hWnd
ToolText = "Creates a numbered list based on the current defaults"
Case tbnWord(2).hWnd
ToolText = "Creates a bulleted list based on the current defaults"
Case tbnWord(3).hWnd
ToolText = "Moves the left indent to the previous tab stop"
Case tbnWord(4).hWnd
ToolText = "Moves the left indent to the next tab stop"
Case tbnWord(5).hWnd
ToolText = "Inserts a table"
Case tbnWord(6).hWnd
ToolText = "Changes the column format within the sections"
Case tbnWord(7).hWnd
ToolText = "Inserts an empty frame or frames the selected text"
Case tbnWord(8).hWnd
ToolText = "Inserts a Microsoft Draw object"
Case tbnWord(9).hWnd
ToolText = "Inserts a Microsoft Graph object"
Case tbnWord(10).hWnd
ToolText = "Creates an envelope that will print along with the current document"
Case tbnWord(11).hWnd
ToolText = "Checks the spelling in the active document"
Case tbnWord(12).hWnd
ToolText = "Prints the active document using the current defaults"
Case tbnWord(13).hWnd
ToolText = "Scales the editing view to see the whole page in Page Layout view"
Case tbnWord(14).hWnd
ToolText = "Scales the editing view to 100% in Normal view"
Case tbnWord(15).hWnd
ToolText = "Scales the editing view to see the width of the page"
End Select
End Sub